<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditDeviceHasPatientTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditDeviceHasPatientLabel_creationDate}" for="creationDate" />
                    <h:inputText id="creationDate" value="#{deviceHasPatientController.selected.creationDate}" title="#{bundle.EditDeviceHasPatientTitle_creationDate}" required="true" requiredMessage="#{bundle.EditDeviceHasPatientRequiredMessage_creationDate}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditDeviceHasPatientLabel_room}" for="room" />
                    <h:inputText id="room" value="#{deviceHasPatientController.selected.room}" title="#{bundle.EditDeviceHasPatientTitle_room}" required="true" requiredMessage="#{bundle.EditDeviceHasPatientRequiredMessage_room}"/>
                    <h:outputLabel value="#{bundle.EditDeviceHasPatientLabel_id}" for="id" />
                    <h:inputText id="id" value="#{deviceHasPatientController.selected.id}" title="#{bundle.EditDeviceHasPatientTitle_id}" required="true" requiredMessage="#{bundle.EditDeviceHasPatientRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.EditDeviceHasPatientLabel_patientid}" for="patientid" />
                    <h:selectOneMenu id="patientid" value="#{deviceHasPatientController.selected.patientid}" title="#{bundle.EditDeviceHasPatientTitle_patientid}" required="true" requiredMessage="#{bundle.EditDeviceHasPatientRequiredMessage_patientid}">
                        <f:selectItems value="#{patientController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditDeviceHasPatientLabel_medicalStaffid}" for="medicalStaffid" />
                    <h:selectOneMenu id="medicalStaffid" value="#{deviceHasPatientController.selected.medicalStaffid}" title="#{bundle.EditDeviceHasPatientTitle_medicalStaffid}" required="true" requiredMessage="#{bundle.EditDeviceHasPatientRequiredMessage_medicalStaffid}">
                        <f:selectItems value="#{medicalStaffController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditDeviceHasPatientLabel_deviceid}" for="deviceid" />
                    <h:selectOneMenu id="deviceid" value="#{deviceHasPatientController.selected.deviceid}" title="#{bundle.EditDeviceHasPatientTitle_deviceid}" required="true" requiredMessage="#{bundle.EditDeviceHasPatientRequiredMessage_deviceid}">
                        <f:selectItems value="#{deviceController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{deviceHasPatientController.update}" value="#{bundle.EditDeviceHasPatientSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditDeviceHasPatientViewLink}"/>
                <br />
                <h:commandLink action="#{deviceHasPatientController.prepareList}" value="#{bundle.EditDeviceHasPatientShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditDeviceHasPatientIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
